<?php
/* @var $this BController */
/* @var $app CWebApplication */
/* @var $cs CClientScript */

$app = Yii::app();
$cs = $app->getClientScript();
$cs->registerCoreScript('jquery');
$cs->registerCoreScript('cookie');

?>
<!DOCTYPE html>
<html lang="<?php echo $app->language; ?>">
<head>
	<meta charset="<?php echo $app->charset; ?>">
	<meta http-equiv="X-UA-Compatible" content="IE=Edge">
	<title><?php echo CHtml::encode($this->pageTitle); ?></title>
	<link rel="stylesheet" href="<?php echo $this->baseUrl; ?>/css/dashicons/css/dashicons.css">
	<link rel="stylesheet" href="<?php echo $this->baseUrl; ?>/css/style.css">
	<!--[if lt IE 9]>
	<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
	<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
	<![endif]-->
	<script type="text/javascript" src="<?php echo $this->baseUrl; ?>/js/jquery/hoverIntent.js"></script>
	<script type="text/javascript" src="<?php echo $this->baseUrl; ?>/js/jquery/jquery.scrollUp.min.js"></script>
	<script type="text/javascript" src="<?php echo $this->baseUrl; ?>/js/common.js"></script>
</head>
<body class="<?php echo empty($_COOKIE['admin-menu-fold']) ? '' : 'folded'; ?>">
<div id="ycmf-wrap">
	<div id="ycmf-admin-bar" class="navbar navbar-inverse navbar-fixed-top">
		<div class="navbar-header pull-left">
			<button id="fold-menu" class="btn btn-navbar" type="button">
				<span class="icon-bar"></span>
				<span class="icon-bar"></span>
				<span class="icon-bar"></span>
			</button>
			<a href="<?php echo $this->createUrl('/site/index'); ?>"
			   class="brand"><?php echo CHtml::encode($app->name); ?></a>
		</div>
		<div class="dropdown pull-right" id="ycmf-admin-bar-account">
			<a href="#" class="ab-item dropdown-toggle"
			   data-toggle="dropdown">您好，<?php echo CHtml::encode(Yii::app()->getUser()->getName()); ?><span
					class="caret"></span></a>
			<ul class="dropdown-menu" role="menu" id="ycmf-admin-bar-account-menu">
				<li><?php echo CHtml::link('个人资料', array('/user/profile')); ?></li>
				<li class="divider"></li>
				<li><?php echo CHtml::link('退出', array('/site/logout')); ?></li>
			</ul>
		</div>
	</div>
	<!-- /#ycmf-admin-bar -->
	<div id="ycmf-admin-menu">
		<div id="ycmf-admin-menu-back"></div>
		<!-- /#ycmf-admin-menu-back -->
		<div id="ycmf-admin-menu-wrap">
			<?php $this->widget('YAdminMenu'); ?>
		</div>
		<!-- /#ycmf-admin-menu-wrap -->
	</div>
	<!-- /#ycmf-admin-menu -->
	<div id="ycmf-content">
		<div id="ycmf-body" class="clearfix">
			<div id="ycmf-body-content">
				<div class="wrap">
					<div class="container-fluid">
						<div class="breadcrumbs">
							<?php if (isset($this->breadcrumbs)): ?>
								<?php $this->widget('bootstrap.widgets.TbBreadcrumbs', array(
									'links' => $this->breadcrumbs,
								)); ?><!-- breadcrumbs -->
							<?php endif ?>
						</div>
						<?php $this->widget('bootstrap.widgets.TbAlert'); ?>
						<?php echo $content; ?>
					</div>
				</div>
				<!-- /.wrap -->
			</div>
			<!-- /#ycmf-body-content -->
		</div>
		<!-- /#ycmf-body -->
	</div>
	<!-- /#ycmf-content -->
	<div id="ycmf-footer">
		<div class="container-fluid">
			<p class="pull-left">&copy; <?php echo date('Y'); ?></p>

			<p class="pull-right"><?php echo YCmf::app()->version; ?></p>
		</div>
	</div>
	<!-- /#ycmf-footer -->
</div>
<script type="text/javascript">
	jQuery(function ($) {
		$.scrollUp({scrollText: "Top"});
	});
</script>
<!-- /#ycmf-wrap -->
</body>
</html>

